package com.java;

import com.java.controller.UserController;
import com.java.model.User;
import com.java.test.student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 666
 * Date: 2023-07-19
 * Time: 17:09
 */
public class demo {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("spring-config.xml");
            BeanScopesController beanScopesController = context.getBean(BeanScopesController.class);
        System.out.println(beanScopesController.getUser().toString()+"这是第一个调用对象修改之后的");
        BeanScopesController2 beanScopesController2 = context.getBean(BeanScopesController2.class);
        System.out.println(beanScopesController2.getUser2().toString()+"这是第二个对象调用之后的");

    }
}
